import { Spin } from "antd";
import { PropsWithChildren } from "react";

interface ILoadingProps {
  className?: string;
}
export function Loading(props: PropsWithChildren<ILoadingProps>) {
  const { children } = props;
  return (
    <>
      <div className="absolute left-0 top-0 w-full h-full flex items-center justify-center z-10 bg-[#00000077]">
        <div className="bg-white flex flex-col justify-center items-center rounded-lg px-[32px] py-[20px] gap-[12px]">
          <Spin />
          <div>{children}</div>
        </div>
      </div>
    </>
  );
}
